package org.mch.comm.db.handler;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.dbutils.ResultSetHandler;

public class SingleMap2Handler implements ResultSetHandler<Map<Object, Object>> {

	public Map<Object, Object> handle(ResultSet rs) throws SQLException {
		Map<Object, Object> map = new HashMap<Object, Object>();
		while (rs.next()) {
			map.put(rs.getObject(1), rs.getObject(2));
		}
		return map;
	}
}